x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 9 Jan 2008 10:11:31 +0000 (10:11 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 9 Jan 2008 10:11:31 +0000 (10:11 +0000)
immediate byte third operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/x86_emulate.c

index f89404706827551698438a2daa7098d4954f8202..07bc21f4ed2e634fcc945492516c0b01941fca12 100644 (file)
@@ -1064,6 +1064,9 @@ x86_emulate(
                     /* Special case in Grp3: test has immediate operand. */
                     ea.mem.off += (d & ByteOp) ? 1
                         : ((op_bytes == 8) ? 4 : op_bytes);
+                else if ( (b == 0xf7) == 0xa4 )
+                    /* SHLD/SHRD with immediate byte third operand. */
+                    ea.mem.off++;
                 break;
             case 1:
                 ea.mem.off += insn_fetch_type(int8_t);